﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Layouts/Administration.Master" Inherits="System.Web.Mvc.ViewPage<FacialClub.Helpers.PaginatedListCollection<FacialClub.Models.Entities.Notification>>" %>
<%@ Import Namespace="FacialClub.Helpers" %>
<%@ Import Namespace="MvcPaging" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Notification Listings</h2>

    <table width="100%" cellpadding="0" cellspacing="0" frame="box">
        <tr align="left" >
            <td align="left" bgcolor="#CCCCCC">
                <b>Title
            </b>
            </td>
            <td align="left" bgcolor="#CCCCCC">
                <b>Subject
            </b>
            </td>
            <td align="left" bgcolor="#CCCCCC">
                <b>IsActive
            </b>
            </td>
            <td align="left" bgcolor="#CCCCCC">
                <b>CreatedDate
            </b>
            </td>
            <td align="left" bgcolor="#CCCCCC">
                <b>ModifiedDate
            </b>
            </td>
            <td align="left" bgcolor="#CCCCCC"><b>Actions</b></td>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td> 
                <%: Html.ActionLink(item.Title, "Details", new { id = item.NotificationId })%>
            </td>
            <td>
                <%: item.Subject %>
            </td>
            <td>
                <%: item.IsActive %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreatedDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.ModifiedDate) %>
            </td>
            <td>
                <table>
                <tr>
                <td><%: Html.CustomActionLink("Edit", "Notification", new { id = item.NotificationId }, "/Content/images/edit_icon.png","Edit")%></td>
                <td><%: Html.CustomActionLink("Delete", "Notification", new { id = item.NotificationId }, "/Content/images/delete_icon.png", "Delete")%></td>
                </tr>
                </table>
            </td>
        </tr>
    
    <% } %>
    <tr>
    <td>  <div class="pager"> <%= Html.Pager(ViewData.Model.PageSize, ViewData.Model.PageIndex+1, ViewData.Model.TotalCount )%> </div>
</td>
    </tr>
    <tr>
    <td><%: Html.ActionLink("Create New", "Create") %></td>
    </tr>

    </table>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

